use Action;

package TestAction;

@ISA = qw/Action/;

our @DEPENDS_ON = qw/DisplayManager ActionManager/;

sub __validate{
    my $self=shift;
    my $display = $self->{DisplayManager};

    my $result;
    if($self->params->{IS_OK}){
	$result = ActionResult->new("SUCCESS", "OK");
    }else{    
	$result = ActionResult->new("FAILURE", "ERROR");
    }

    return $result;
}

sub __do{
    my $self = shift;
    my $display = $self->{DisplayManager};

    $display->print($self->params->{STR});

    my  $result = ActionResult->new("DONE", "Done");
    return $result;
}
